package com.itbupt.infrastructure.persistent.dao;

import cn.bugstack.middleware.db.router.annotation.DBRouter;
import com.itbupt.infrastructure.persistent.po.RaffleActivityAccountMonth;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Author dingchang
 * @Date 2025/4/2 16:22
 * @Description: 抽奖活动账户表-月次数Dao
 */

@Mapper
public interface IRaffleActivityAccountMonthDao {
    /**
     * 更新抽奖活动账户表-月次数
     * @param raffleActivityAccountMonth 抽奖活动账户表-月次数
     * @return 影响行数
     */
    int updateActivityAccountMonthSubtractionQuota(RaffleActivityAccountMonth raffleActivityAccountMonth);

    /**
     * 新建一条抽奖活动账户记录-月次数
     * @param raffleActivityAccountMonth
     */
    void insertActivityAccountMonth(RaffleActivityAccountMonth raffleActivityAccountMonth);

    /**
     *  查询抽奖活动月信息
     * @param raffleActivityAccountMonthReq
     * @return RaffleActivityAccountMonth
     */
    @DBRouter
    RaffleActivityAccountMonth queryActivityAccountMonthByUserId(RaffleActivityAccountMonth raffleActivityAccountMonthReq);

    /**
     * 更新抽奖活动账户-月次数 - 增加额度
     * @param raffleActivityAccountMonth
     */
    void addAccountQuota(RaffleActivityAccountMonth raffleActivityAccountMonth);

}
